package com.kingoe.shardingdj.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kingoe.shardingdj.entity.TbCommodityInfo;

import java.util.List;

/**
 * 通过sharding jdbc实现读写分离
 * @author jinwu
 */
public interface TbCommodityInfoService extends IService<TbCommodityInfo> {
    /**
     *
     * 读写分离 从库读取数据
     * @return
     */
    List<TbCommodityInfo> getCommodityInfoList();

    /**
     * 走主库写入数据
     * @param commodityName
     * @param commodityPrice
     * @param description
     * @param number
     * @return
     */
    boolean insertCommodityInfo(String commodityName, String commodityPrice, String description, Integer number);

}
